<?php
require_once("userView.php");
require_once(CORE_DIR.'userModel.php');

class deleteimageAction extends authAction{

	function __construct(){
		$this->view = new userView();
	}

	public function run($get, $post, $viewtype) {
		parent::run($get,$post,$viewtype);
		
		$status = 0;
		if (isset($get["uid"]) && isset($get["image"])) {
			if (unlink("imagesuser/".$get["uid"]."/".$get["image"]))
				$status = 1;
		}
		
		$this->view->setProperty("status", $status);
		$this->view->setProperty("id", $get["uid"]);
		$this->view->showDeleteTaskImage();
	}
}
?>